﻿using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using Nutshell.DOS.Business;

namespace Nutshell.DOS.WPFUI
{
        /// <summary>
        /// MainWindow.xaml 的交互逻辑
        /// </summary>
        public partial class MainWindow
        {

                private readonly GlobalManager _gm = GlobalManager.Instance;

                public MainWindow()
                {
                        InitializeComponent();
                }

                private void Window_OnLoaded(object sender, RoutedEventArgs e)
                {
                        _gm.Start();

                        Title = "果壳分布式OPC服务器 -- " + _gm.OPCServer.Id;
                        LayoutRoot.DataContext = _gm;

                        _gm.OPCServer.Start();

                        _gm.OPCServer.Attach();
                        
                }

                


                private void MainWindow_OnClosing(object sender, CancelEventArgs e)
                {
                        
                }                
        }
}
